function Color(props) {
    return ( <div>
        <h3>控制颜色 {props.color}</h3>        
        <input type="color" 
        onChange={(e)=>{          
            props.setColor(e.target.value)
        }}
        value={props.color}/>
        {props.children}
    </div> );
}

export default Color;
Color.defaultProps = {color:"#FFFF00"}